/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cardarus.operatingsystem.struts.forms;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author nobal
 */
public class PaymentOptionActionForm extends org.apache.struts.action.ActionForm {

    boolean isCash;
    boolean isDebitCard;
    boolean isCreditCard;
    int optionType; //from from data

    public boolean isIsCash() {
        return isCash;
    }

    public void setIsCash(boolean isCash) {
        this.isCash = isCash;
    }

    public boolean isIsCreditCard() {
        return isCreditCard;
    }

    public void setIsCreditCard(boolean isCreditCard) {
        this.isCreditCard = isCreditCard;
    }

    public boolean isIsDebitCard() {
        return isDebitCard;
    }

    public void setIsDebitCard(boolean isDebitCard) {
        this.isDebitCard = isDebitCard;
    }

    public int getOptionType() {
        return optionType;
    }

    public void setOptionType(int optionType) {
        this.optionType = optionType;
        if (optionType == 0) {
            setIsCash(true);
        } else if (optionType == 1) {
            setIsDebitCard(true);
        } else {
            setIsCreditCard(true);
        }
    }

    /**
     *
     */
    public PaymentOptionActionForm() {
        super();
        // TODO Auto-generated constructor stub
    }
}
